package com.gitee.zhanyao.monomer.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "响应包装实体")
public class ResponseInfo<T> implements Serializable {

    @Schema(title = "成功标识",
            description = "成功标识：true：成功；false:失败",
            required = true,
            example = "true")
    private boolean success = false;

    @Schema(title = "响应代码",
            description = "响应代码",
            required = true,
            example = "200")
    private Integer code;

    @Schema(title = "响应信息",
            description = "响应信息",
            required = true,
            example = "操作成功")
    private String message;

    @Schema(title = "实体信息",
            description = "实体信息",
            required = true,
            example = "")
    private T data;

}
